#include <QLineEdit>

/**
	Combined search text edit line and label
*/
class SearchLineEdit : public QLineEdit {
	Q_OBJECT

	public:
		SearchLineEdit(QWidget *parent=0);
		~SearchLineEdit();

		QString text() const;

	protected:

		bool hasText() const { return m_has_text; }
		void setHasText(bool has_text) { m_has_text = has_text; }

		bool m_has_text;

		void focusInEvent(QFocusEvent *event);
		void focusOutEvent(QFocusEvent *event);

		void resetSearchTooltip();

	protected slots:
		void updateHasTextState(const QString& new_text);

};
